package liumengbaio.lolzhangyoubao.Activity.Adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import java.util.List;

import liumengbaio.lolzhangyoubao.R;

/**
 * Created by lanouhn on 16/9/5.
 */
public class FaseBindAdapter extends BaseAdapter {
    private List<String> list;
    private Context mContext;

    public FaseBindAdapter(List<String> list, Context mContext) {
        this.list = list;
        this.mContext = mContext;
    }

    @Override
    public int getCount() {
        return list.size();
    }

    @Override
    public Object getItem(int position) {
        return list.get(position);
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        convertView = LayoutInflater.from(mContext).inflate(R.layout.server_name_item, null);
        TextView area_name = (TextView) convertView.findViewById(R.id.area_name);
        area_name.setText(list.get(position));
        return convertView;
    }
}
